#pragma once

#include "Containers/Vector.h"
#include "Containers/SharedObjectPtr.h"
#include "Framework/ApplicationSubsystem.h"
#include "SceneManager.m.h"

class RScene;

RCLASS()
class WHENGINE_API RSceneManager : public RApplicationSubsystem
{
    ROBJECT
public:
    RSceneManager(){};

    TSharedObjectPtr<RScene> GetFirstScene()
    {
        if(!Scenes.Empty())
        {
            return Scenes[0];
        }
        return nullptr;
    }

    //TSharedObjectPtr<RScene> CreateScene();

    void Register(RScene* InScene);

    void UnRegister(RScene* InScene);
private:
    TVector<TWeakObjectPtr<RScene>> Scenes;

public:
    void Tick(float DeltaSeconds) ;

};